package com.boat.sample.ddd.infrastructure.client.factory;

import java.util.Date;

import com.boat.sample.ddd.infrastructure.client.LxrClient;
import com.boat.sample.ddd.infrastructure.client.request.QueryKLineReq;

import cn.hutool.core.date.DateUtil;

public class LxrFactory {
	public static QueryKLineReq createQueryKLineReq(String stockCode, String startDate) {
		QueryKLineReq req = new QueryKLineReq();
		req.setToken(LxrClient.token);
		req.setEndDate(DateUtil.formatDate(new Date()));
//		不复权: ex_rights
//		理杏仁前复权: lxr_fc_rights
//		前复权: fc_rights
//		后复权: bc_rights
		req.setType("lxr_fc_rights");
		req.setStockCode(stockCode);
		req.setStartDate(startDate);
		return req;
	}
}
